from apscheduler.schedulers.background import BackgroundScheduler


class MyScheduler:

    def __init__(self):
        self.scheduler = None

    def init_config(self, jobs):
        self.scheduler = BackgroundScheduler()
        for job in jobs:
            self.scheduler.add_job(**job)
        self.scheduler.start()


scheduler = MyScheduler()
